package com.objetdirect.gwt.umldrawer.client;

import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.VerticalPanel;

public class HomePageContent implements PageContent{

	private VerticalPanel mainPanel = new VerticalPanel() ;
	private VerticalPanel buttons_text = new VerticalPanel() ;
	private HorizontalPanel body = new HorizontalPanel() ;
	private VerticalPanel bodyAndBar = new VerticalPanel();
	private Image headerImage = new Image();
	private Image homeLogo = new Image() ;
	private Image umlImage = new Image() ;
	private Image footer = new Image() ;
	
	@Override
	public void setPageContent() {
		
		headerImage.setUrl("images/header.png");
		headerImage.setWidth("1201px");
		headerImage.setStyleName("headerImage");
		
		homeLogo.setStyleName("homePageImage");
		homeLogo.setUrl("images/homepage.jpg");
		
		umlImage.setUrl("images/image.jpg");
		umlImage.setStyleName("homeLeftImage");
		
		buttons_text.add(new HeaderButtons().getHeaderButtons());
		buttons_text.add(new HomeText().getText());
		
		body.add(umlImage);
		body.add(buttons_text);
		body.add(homeLogo);
		
		bodyAndBar.add(body);
		bodyAndBar.add(new PrivacyBar().getprivacyBar());
		
		bodyAndBar.setStyleName("border");
		
		footer.setUrl("images/footer.png");
		footer.setWidth("1201px");
		
		mainPanel.add(headerImage);
		mainPanel.add(bodyAndBar);
		mainPanel.add(footer);
	}
	
	@Override
	public VerticalPanel getPageContent() {
		// TODO Auto-generated method stub
		setPageContent();
		return mainPanel ;
	}
}
